﻿using System;
using System.Reflection;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using AnyOffice.Components;
using AnyOffice.DAL;
using log4net;
namespace AnyOffice.general.mytable
{
    public partial class workplan : System.Web.UI.UserControl
    {
        private static ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
      
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                SqlConnection conn = new SqlConnection(ConfigManager.ConnectionString);
                UserCache cache = new UserCache();
                DataTable table = new PlanWorkDao().Today(conn, cache.DeptId);
                if (table.Rows.Count > 0)
                {
                    this.rptWorkplan.DataSource = table;
                    this.rptWorkplan.DataBind();
                }
                else
                {
                    this.litWorkplan.Text = "·暂无计划";
                }
                conn.Close();
            }
            catch (Exception exception)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("", exception);
                }
            }
        }

    }
}